package GameEngine;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.image.BufferedImage;

import javax.swing.JComponent;

public class MyComponent extends JComponent {

	private BufferedImage backBuffer;

	public MyComponent() {
		setBackground(Color.BLACK);
		setDoubleBuffered(true);
		setVisible(true);
		
	}


	

	public void paint(Graphics g) {
		if (GameObject2D.gameObjects != null) {
			for (int cont = 0; cont < GameObject2D.gameObjects.size(); cont++) {
				GameObject2D.gameObjects.get(cont).paint(g);
			}
		}
	}
}
